package com.xxg.fileshand.greendao;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.xxg.fileshand.greendao.BorrowDTO;
import com.xxg.fileshand.greendao.CaseCodeDTO;
import com.xxg.fileshand.greendao.CaseNoDTO;
import com.xxg.fileshand.greendao.FilesInfoDTO;
import com.xxg.fileshand.greendao.InventoryTaskDTO;
import com.xxg.fileshand.greendao.OfflineRequestDTO;
import com.xxg.fileshand.greendao.ReadDTO;
import com.xxg.fileshand.greendao.UserDTO;
import com.xxg.fileshand.greendao.UserInfoDTO;
import com.xxg.fileshand.greendao.WzInfoDTO;

import com.xxg.fileshand.greendao.BorrowDTODao;
import com.xxg.fileshand.greendao.CaseCodeDTODao;
import com.xxg.fileshand.greendao.CaseNoDTODao;
import com.xxg.fileshand.greendao.FilesInfoDTODao;
import com.xxg.fileshand.greendao.InventoryTaskDTODao;
import com.xxg.fileshand.greendao.OfflineRequestDTODao;
import com.xxg.fileshand.greendao.ReadDTODao;
import com.xxg.fileshand.greendao.UserDTODao;
import com.xxg.fileshand.greendao.UserInfoDTODao;
import com.xxg.fileshand.greendao.WzInfoDTODao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig borrowDTODaoConfig;
    private final DaoConfig caseCodeDTODaoConfig;
    private final DaoConfig caseNoDTODaoConfig;
    private final DaoConfig filesInfoDTODaoConfig;
    private final DaoConfig inventoryTaskDTODaoConfig;
    private final DaoConfig offlineRequestDTODaoConfig;
    private final DaoConfig readDTODaoConfig;
    private final DaoConfig userDTODaoConfig;
    private final DaoConfig userInfoDTODaoConfig;
    private final DaoConfig wzInfoDTODaoConfig;

    private final BorrowDTODao borrowDTODao;
    private final CaseCodeDTODao caseCodeDTODao;
    private final CaseNoDTODao caseNoDTODao;
    private final FilesInfoDTODao filesInfoDTODao;
    private final InventoryTaskDTODao inventoryTaskDTODao;
    private final OfflineRequestDTODao offlineRequestDTODao;
    private final ReadDTODao readDTODao;
    private final UserDTODao userDTODao;
    private final UserInfoDTODao userInfoDTODao;
    private final WzInfoDTODao wzInfoDTODao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        borrowDTODaoConfig = daoConfigMap.get(BorrowDTODao.class).clone();
        borrowDTODaoConfig.initIdentityScope(type);

        caseCodeDTODaoConfig = daoConfigMap.get(CaseCodeDTODao.class).clone();
        caseCodeDTODaoConfig.initIdentityScope(type);

        caseNoDTODaoConfig = daoConfigMap.get(CaseNoDTODao.class).clone();
        caseNoDTODaoConfig.initIdentityScope(type);

        filesInfoDTODaoConfig = daoConfigMap.get(FilesInfoDTODao.class).clone();
        filesInfoDTODaoConfig.initIdentityScope(type);

        inventoryTaskDTODaoConfig = daoConfigMap.get(InventoryTaskDTODao.class).clone();
        inventoryTaskDTODaoConfig.initIdentityScope(type);

        offlineRequestDTODaoConfig = daoConfigMap.get(OfflineRequestDTODao.class).clone();
        offlineRequestDTODaoConfig.initIdentityScope(type);

        readDTODaoConfig = daoConfigMap.get(ReadDTODao.class).clone();
        readDTODaoConfig.initIdentityScope(type);

        userDTODaoConfig = daoConfigMap.get(UserDTODao.class).clone();
        userDTODaoConfig.initIdentityScope(type);

        userInfoDTODaoConfig = daoConfigMap.get(UserInfoDTODao.class).clone();
        userInfoDTODaoConfig.initIdentityScope(type);

        wzInfoDTODaoConfig = daoConfigMap.get(WzInfoDTODao.class).clone();
        wzInfoDTODaoConfig.initIdentityScope(type);

        borrowDTODao = new BorrowDTODao(borrowDTODaoConfig, this);
        caseCodeDTODao = new CaseCodeDTODao(caseCodeDTODaoConfig, this);
        caseNoDTODao = new CaseNoDTODao(caseNoDTODaoConfig, this);
        filesInfoDTODao = new FilesInfoDTODao(filesInfoDTODaoConfig, this);
        inventoryTaskDTODao = new InventoryTaskDTODao(inventoryTaskDTODaoConfig, this);
        offlineRequestDTODao = new OfflineRequestDTODao(offlineRequestDTODaoConfig, this);
        readDTODao = new ReadDTODao(readDTODaoConfig, this);
        userDTODao = new UserDTODao(userDTODaoConfig, this);
        userInfoDTODao = new UserInfoDTODao(userInfoDTODaoConfig, this);
        wzInfoDTODao = new WzInfoDTODao(wzInfoDTODaoConfig, this);

        registerDao(BorrowDTO.class, borrowDTODao);
        registerDao(CaseCodeDTO.class, caseCodeDTODao);
        registerDao(CaseNoDTO.class, caseNoDTODao);
        registerDao(FilesInfoDTO.class, filesInfoDTODao);
        registerDao(InventoryTaskDTO.class, inventoryTaskDTODao);
        registerDao(OfflineRequestDTO.class, offlineRequestDTODao);
        registerDao(ReadDTO.class, readDTODao);
        registerDao(UserDTO.class, userDTODao);
        registerDao(UserInfoDTO.class, userInfoDTODao);
        registerDao(WzInfoDTO.class, wzInfoDTODao);
    }
    
    public void clear() {
        borrowDTODaoConfig.clearIdentityScope();
        caseCodeDTODaoConfig.clearIdentityScope();
        caseNoDTODaoConfig.clearIdentityScope();
        filesInfoDTODaoConfig.clearIdentityScope();
        inventoryTaskDTODaoConfig.clearIdentityScope();
        offlineRequestDTODaoConfig.clearIdentityScope();
        readDTODaoConfig.clearIdentityScope();
        userDTODaoConfig.clearIdentityScope();
        userInfoDTODaoConfig.clearIdentityScope();
        wzInfoDTODaoConfig.clearIdentityScope();
    }

    public BorrowDTODao getBorrowDTODao() {
        return borrowDTODao;
    }

    public CaseCodeDTODao getCaseCodeDTODao() {
        return caseCodeDTODao;
    }

    public CaseNoDTODao getCaseNoDTODao() {
        return caseNoDTODao;
    }

    public FilesInfoDTODao getFilesInfoDTODao() {
        return filesInfoDTODao;
    }

    public InventoryTaskDTODao getInventoryTaskDTODao() {
        return inventoryTaskDTODao;
    }

    public OfflineRequestDTODao getOfflineRequestDTODao() {
        return offlineRequestDTODao;
    }

    public ReadDTODao getReadDTODao() {
        return readDTODao;
    }

    public UserDTODao getUserDTODao() {
        return userDTODao;
    }

    public UserInfoDTODao getUserInfoDTODao() {
        return userInfoDTODao;
    }

    public WzInfoDTODao getWzInfoDTODao() {
        return wzInfoDTODao;
    }

}
